{% extends "base.html" %}
{% block title %} 我的资料{% endblock %}
{% block header %}

{% endblock %}

{% block content %}



<div class="container">
  <div class="span12">
    <ul class="nav nav-tabs">
      <li class="active"><a href="\my\">我的资料</a></li>
      <li><a href="\my_sell\">我出售的商品</a></li>
      <li><a href="\my_buy\">我购买的商品</a></li>
      <li><a href="\my_add\">添加新商品</a></li>
    </ul>
  </div>
</div>

<div class="container">
  <div class="span12">
    <div class="alert alert-info">
      <a class="close" data-dismiss="alert">×</a>
      <h5>Tips, remove me!</h5>
      <ul>
        <li>充值请调用你实现的第三方支付平台。</li>
        <li>为了简化支付平台，我们约定：
          <ol>
            <li>银行卡不需要密码，只要知道银行卡号就可以消费 </li>
            <li>银行卡余额都是“无限”</li>
          </ol>
        </li>
      </ul>
    </div>
  </div>
</div>

<div class="container">
  <div class="span12">
    <div class="row">
      <div class="span6">
        <h3 class="well">我的帐户余额 <span class="label label-success">{{user.balance}}</span> 元</h3>
      </div>
      <div class="span6">
        
        <div class="well form-inline">
          <div class="input-prepend input-append">
            <span class="add-on">¥</span><input type="text" class="input-small" placeholder="0.00" id="amount"><span
              class="add-on">元</span>
          </div>
          <button class="btn btn-danger" id="recharge" >充值</button>
        </div>
      </div>
    </div>
  </div>




  <div class="span12">
    <table class="table table-bordered table-striped">
      <tbody>
        <tr>
          <td>帐号</td>
          <td>{{user.username}}</td>
        </tr>
        <tr>
          <td>姓名</td>
          <td>{{user.truename}}</td>
        </tr>
        <tr>
          <td>生日</td>
          <td>{{user.birthday}}</td>
        </tr>
        <tr>
          <td>联系电话</td>
          <td>{{user.phone}}</td>
        </tr>
        <tr>
          <td>地址</td>
          <td>{{user.address}}</td>
        </tr>
        <tr>
          <td>邮编</td>
          <td>{{user.zipcode}}</td>
        </tr>
      </tbody>
    </table>
  </div>
</div>

{% endblock %}
{% block js %}
<script>
  $("#recharge").click( function (){
    amount=$("#amount").val()
    window.location.href = "/recharge/?amount="+amount;
  }
  )

</script>

{% endblock %}